<div id="pad-wrapper" class="new-user">
	<div class="row-fluid header">
		<h3>查看线下检测报告</h3>
	</div>
	<div class="row-fluid form-wrapper">
		<!-- left column -->
		<div class="span9 with-sidebar">
			<div class="container">
				<form class="new_user_form form-horizontal" action="/offline/save" method="post" id="dataForm" enctype="multipart/form-data">
					<input type="hidden" name="id" value="<?php echo $row['report_id']?>">
					<div class="field-box"></div>
					<div class="control-group form-group span12">
						<label class="control-label" for="banner_name">检测的产品名称:</label>
						<div class="controls col-lg-5">
							<input type="text" class="form-control" id="content" name="content" value="<?php echo $row['content']?>" placeholder="检测的产品名称"/>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="banner_name">检测人:</label>
						<div class="controls col-lg-5">
							<input type="text" class="form-control" id="name" name="name" value="<?php echo $row['name']?>" placeholder="检测人"/>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="link">手机号:</label>
						<div class="controls col-lg-5">
							<input type="text" class="form-control" name="mobile" id="mobile" value="<?php echo $row['mobile']?>" placeholder="手机号"/>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="image">报告附件:</label>
						<div class="controls col-lg-5">
							<?php if($row['file']):?><a href="<?php echo STATIC_IMAGE . $row['file']?>" target="_blank"><i class="icon-folder-open-alt"></i></a>&emsp;<?php endif;?><input class="form-control" type="file" accept="application/pdf, image/gif, image/jpeg, image/x-png" name="file"/>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="status">检测结果:</label>
						<div class="controls col-lg-5">
							<div class="ui-select span3">
								<select name="report_result_id">
									<?php if($result_list):?>
									<?php foreach ($result_list as $item):?>
									<option value="<?php echo $item['report_result_id']?>"  <?php if($row['report_result_id'] == $item['report_result_id']):?> selected="selected" <?php endif;?>><?php echo $item['description']?></option>
									<?php endforeach;?>
									<?php endif;?>
								</select>
							</div>
						</div>
					</div>
					<div class="span12 field-box"></div>
					<div class="control-group form-group span12 actions">
						<label class="control-label" for="" class="control-label"></label>
						<div class="controls col-lg-5">
							<input type="submit" class="btn-glow primary" value="提交" />
						</div>
					</div>
				</form>
			</div>
		</div>
		<!-- side right column -->
		<div class="span3 form-sidebar pull-right">
		</div>
	</div>	
	<script type="text/javascript">
	$(document).ready(function() {
		$('#dataForm').bootstrapValidator({
			message: 'This value is not valid',
			feedbackIcons: {
				valid: 'glyphicon glyphicon-ok',
				invalid: 'glyphicon glyphicon-remove',
				validating: 'glyphicon glyphicon-refresh'
			},
			fields: {
				name: {
					message: '检测人不符合规则',
					validators: {
						notEmpty: {
							message: '检测人是必填项，不能为空'
						}
					}
				},
				content: {
					message: '检测的产品名称不符合规则',
					validators: {
						notEmpty: {
							message: '检测的产品名称是必填项，不能为空'
						},
					}
				},
				mobile: {
					message: '手机号不符合规则',
					validators: {
						notEmpty: {
							message: '手机号是必填项，不能为空'
						},
						regexp: { 
	　　　　　　　　　　　　　　　　　　regexp: /^1\d{10}$/, 
	　　　　　　　　　　　　　　　　　　message: "手机号格式不正确"
　　　　　　　　　　　　　　　　       } 
					}
				},
				report_result_id: {
					message: '检测结果不符合规则',
					validators: {
						notEmpty: {
							message: '检测结果是必填项，不能为空'
						},
					}
				},
			}
		});
	});
	</script>
</div>